package com.et114.components.tree.tree51;

import java.util.List;

public class HtcTreeNode extends AbstractNode {
	/**
	 * 
	 */
	private static final long	serialVersionUID	= 3985182660967168574L;
	public static final String GYJ_TREE = "<gyj:tree ";
    public static final String GYJ_TREE2 = "</gyj:tree>\n";

    private String srcAction = "";
    private String hrefAction = "";
    private String checked = "";
    private String checkedValue = "";
    private String target = "";

    public String getSrcAction() {
        return srcAction;
    }

    public void setSrcAction(String srcAction) {
        this.srcAction = srcAction;
    }

    public String getTgtAction() {
        return hrefAction;
    }

    public void setTgtAction(String tgtAction) {
        this.hrefAction = tgtAction;
    }

    public String getCheckedValue() {
        return checkedValue;
    }

    public void setCheckedValue(String checkedValue) {
        this.checkedValue = checkedValue;
    }

    public String getChecked() {
        return checked;
    }

    public void setChecked(String checked) {
        this.checked = checked;
    }

    public String getTarget() {
        return target;
    }

    public void setTarget(String target) {
        this.target = target;
    }

    public String getHrefAction() {
        return hrefAction;
    }

    public void setHrefAction(String hrefAction) {
        this.hrefAction = hrefAction;
    }

    public StringBuffer buildNodeContentHtml(boolean hasRoot) {
        StringBuffer sb = new StringBuffer();
        if ( hasRoot ) {
            sb.append(" pic='root' ");
        }
        if ( !hasRoot  && !isLeaf() ) {
        	sb.append(" src=\"" + getSrcAction() + "\" ");
        }
        sb.append("text=\"" + getName() + "\" ");
        sb.append("href=\"" + getTgtAction() + "\" ");
        sb.append("target=\"" + getTarget() + "\" ");
        if (null != getChecked() && !"".equals(getChecked())) {
            sb.append(getChecked() + " checkValue=\"" + getCheckedValue() + "\" ");
        }
        return sb;
    }

    public StringBuffer buildNodeContentHtml() {
        return buildNodeContentHtml(false);
    }

    public List getChildren() {
        // TODO Auto-generated method stub
        return null;
    }

    public Node getParent() {
        // TODO Auto-generated method stub
        return null;
    }

    public boolean isRoot() {
        return isRoot;
    }

    public void setRoot(boolean isRoot) {
        this.isRoot = isRoot;
    }

    public boolean isLeaf() {
        return isLeaf;
    }

    public void setLeaf(boolean isLeaf) {
        this.isLeaf = isLeaf;
    }

	public Long getNodeId() {
		// TODO Auto-generated method stub
		return null;
	}

	public String getNodeName() {
		// TODO Auto-generated method stub
		return null;
	}

	public Integer getNodeType() {
		// TODO Auto-generated method stub
		return null;
	}
}
